<!DOCTYPE html>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-siteapp">
  <title>基本信息</title>
  <link rel="stylesheet" href="${ctx}/static/css/mdui.css">
  <link rel="stylesheet" href="${ctx}/static/css/docs.css">
</head>
<body class="mdui-drawer-body-left mdui-appbar-with-toolbar mdui-theme-primary-blue mdui-theme-accent-pink mdui-loaded">
<header class="mdui-appbar mdui-appbar-fixed">
  <div class="mdui-toolbar mdui-color-theme">
    <span class="mdui-btn mdui-btn-icon mdui-ripple mdui-ripple-white" mdui-drawer="{target: '#main-drawer', swipe: true}"><i class="mdui-icon material-icons">menu</i></span>
    <a href="./index.html" class="mdui-typo-headline mdui-hidden-xs">员工培训系统</a>
      <a href="" class="mdui-typo-title">基本信息</a>
    <div class="mdui-toolbar-spacer"></div>
    <div class="mdui-col-xs-5 mdui-col-md-3">
      <div class="mdui-textfield mdui-textfield-expandable mdui-float-right ">
        <button class="mdui-textfield-icon mdui-btn mdui-btn-icon"><i class="mdui-icon material-icons">search</i></button>
        <input class="mdui-textfield-input" type="text" placeholder="搜索"/>
        <button class="mdui-textfield-close mdui-btn mdui-btn-icon"><i class="mdui-icon material-icons">close</i></button>
      </div>
    </div>
    <span class="mdui-btn mdui-btn-icon mdui-ripple mdui-ripple-white" mdui-dialog="{target: '#dialog-docs-theme'}" mdui-tooltip="{content: '设置主题'}"><i class="mdui-icon material-icons">color_lens</i></span>
    
  <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-siteapp">
  </div>
</header>

<%@include file="../common/leftMenuStaff.jsp"%>
<a id="anchor-top"></a>

<div class="mdui-container doc-container">
  <div class="mdui-clearfix mdui-m-b-3">
    <div class="mdui-shadow-3 mdui-float-left mdui-p-x-2 mdui-m-b-1 mdui-m-r-1" style="line-height: 36px;">
      学习进度：还未参与课程学习
    </div>
    <button class="mdui-btn mdui-btn-raised mdui-ripple mdui-color-theme-accent mdui-float-left mdui-m-r-1 mdui-m-b-1" onclick="location.href='indexStaff.html'">首页</button>
    <button class="mdui-btn mdui-btn-raised mdui-ripple mdui-color-theme-accent mdui-float-left mdui-m-r-1 mdui-m-b-1" onclick="location.href='staffStudy.html'">学习</button>
    <button class="mdui-btn mdui-btn-raised mdui-ripple mdui-color-theme-accent mdui-float-left mdui-m-r-1 mdui-m-b-1" onclick="location.href='staffExam.html'">考试</button>
    <button class="mdui-btn mdui-btn-raised mdui-ripple mdui-color-theme-accent mdui-float-left mdui-m-r-1 mdui-m-b-1" onclick="location.href='staffExamSimulate.html'">模拟考试</button>
    <button class="mdui-btn mdui-btn-raised mdui-ripple mdui-color-theme-accent mdui-float-left mdui-m-r-1 mdui-m-b-1" onclick="location.href='staffMistakes.html'">错题本</button>
  </div>
  <div class="mdui-clearfix mdui-typo">
    <h1 class="doc-title mdui-text-color-theme mdui-col-md-6 mdui-col-md-12 mdui-p-x-0" style="margin-bottom: 0">基本信息</h1>
  </div>
  <form id="staForm"  name="staForm"   action="${ctx}/individual/saveStaf" method="post">
  <div class="mdui-typo mdui-clearfix mdui-m-y-4">
    <div class="mdui-col-md-6">
      <div class="mdui-clearfix">
        <div class="mdui-col-xs-6 mdui-col-md-5" style="line-height: 60px;font-size: 20px;text-align: right;">员工岗位：</div>
        <div class="mdui-col-xs-6" style="line-height: 60px;">
         ${staff.sta_spe}
        </div>

      </div>
      <input type="hidden" id="staId" name="staId" value="${staff.px_staff_id}"/> 
      <div class="mdui-clearfix">
        <div class="mdui-col-xs-6 mdui-col-md-5" style="line-height: 60px;font-size: 20px;text-align: right;">员工工号：</div>
        <div class="mdui-col-xs-6" style="line-height: 60px;">
        ${staff.px_staff_id} 
        </div>
      </div>
      
      <div class="mdui-clearfix">
        <div class="mdui-col-xs-6 mdui-col-md-5" style="line-height: 60px;font-size: 20px;text-align: right;">姓名：</div>
        <div class="mdui-col-xs-6">
          <div class="mdui-textfield">
            <input class="mdui-textfield-input" type="text"> ${staff.staff_name}
          </div>
        </div>
      </div>
      <div class="mdui-clearfix">
        <div class="mdui-col-xs-6 mdui-col-md-5" style="line-height: 60px;font-size: 20px;text-align: right;">性别：</div>
        <div class="mdui-col-xs-6" style="position: relative;top: 12px">
          <select class="mdui-select" id="sex" name="sex" mdui-select>
            <option value="1">男</option>
            <option value="2">女</option>
          </select>
        </div>
      </div>
      <div class="mdui-clearfix">
        <div class="mdui-col-xs-6 mdui-col-md-5" style="line-height: 60px;font-size: 20px;text-align: right;">生日：</div>
        <div class="mdui-col-xs-6">
          <div class="mdui-textfield">
            <input class="mdui-textfield-input" id="birthday" id ="staBir"  name="staBir" type="text" value="${staff.staff_birthday}"placeholder="" />
          </div>
        </div>
      </div>
      <div class="mdui-clearfix">
        <div class="mdui-col-xs-6 mdui-col-md-5" style="line-height: 60px;font-size: 20px;text-align: right;">地址：</div>
        <div class="mdui-col-xs-6">
          <div class="mdui-textfield">
            <input class="mdui-textfield-input"  id="address" name="address" value="${staff.staff_address}" type="text"/>
          </div>
        </div>
      </div>
      <div class="mdui-clearfix">
        <div class="mdui-col-xs-6 mdui-col-md-5" style="line-height: 60px;font-size: 20px;text-align: right;">邮箱：</div>
        <div class="mdui-col-xs-6">
          <div class="mdui-textfield">
            <input class="mdui-textfield-input"  id="emails" name="emails" value="${staff.staff_eml}"type="email" />
          <div class="mdui-textfield-error">邮箱格式错误</div>
          </div>
        </div>
      </div>
      <div class="mdui-clearfix">
        <div class="mdui-col-xs-6 mdui-col-md-5" style="line-height: 60px;font-size: 20px;text-align: right;">电话：</div>
        <div class="mdui-col-xs-6">
          <div class="mdui-textfield">
            <input class="mdui-textfield-input" type="text" id="tel"  name="tel" value="${staff_tel}" pattern="^1[3|4|5|7|8]\d{9}$" placeholder="" />
          <div class="mdui-textfield-error">电话格式错误</div>
          </div>
        </div>
      </div>
    
      <div class="mdui-clearfix">
        <div class="mdui-col-xs-6 mdui-col-md-5" style="line-height: 60px;font-size: 20px;text-align: right;">企业：</div>
        <div class="mdui-col-xs-6" style="position: relative;top: 12px">
          <input list="company" class="mdui-textfield-input"  >${staff.company_name}
          <!-- <datalist id="company" >
            <option value="企业1">企业1</option>
            <option value="企业2">企业2</option>
            <option value="企业3">企业3</option>
            <option value="企业4">企业4</option>
          </datalist> -->
        </div>
      </div>
      <div class="mdui-clearfix">
        <div class="mdui-col-xs-6 mdui-col-md-5" style="line-height: 60px;font-size: 20px;text-align: right;">部门： </div>
        <div class="mdui-col-xs-6" style="position: relative;top: 12px">
          <input list="section" class="mdui-textfield-input"> ${staff.department_name}
          <!-- <datalist id="section" >
            <option value="部门1">部门1</option>
            <option value="部门2">部门2</option>
            <option value="部门2">部门3</option>
            <option value="部门4">部门4</option>
          </datalist> -->
        </div>
      </div>
    </div>
     
    <div class="mdui-col-xs-12 mdui-col-md-6">
      <div class="mdui-clearfix">
        <div class="mdui-col-xs-8 mdui-col-offset-xs-2 mdui-col-md-4 mdui-p-t-1" style="min-width: 168px;border: 1px solid #eee;">
          <img src="./static/img/card.jpg" alt="">
        </div>
      </div>
      <div class="mdui-clearfix mdui-col-xs-8 mdui-col-offset-xs-2 mdui-col-md-4">
        <input type="file" id="uploadAvatars" hidden="">
        <button class="mdui-btn mdui-btn-raised mdui-col-xs-12 mdui-col-md-12 mdui-m-t-1" id="uploadBtn">上传照片</button>
      </div>
    </div>
  </div>
  <div class="mdui-typo mdui-clearfix mdui-m-y-4">
    <button class="mdui-col-xs-8 mdui-col-offset-xs-2 mdui-col-md-2 mdui-btn mdui-btn-raised mdui-ripple mdui-color-theme-accent mdui-m-t-2 " id="noticePush" onclick="saveForm()">提交</button>  
  </div>
   </form>
</div>
<%@include file="../common/theme.jsp"%>


<script type="text/javascript">
  function saveForm(){
  var sta_id=$("#sta_id").val();

  var staBir=$("#staBir").val();
  var address=$("#address").val();
  var emails=$("#emails").val();
  var tel=$("#tel").val();
  if(staBir.length==0||staBir=="")
  {
  alert("请选择你的生日！");
  $("#noticePush").attr("onclick","saveForm(this)");
   return false;
  }
  else if(address.length==0||address==""){
  alert("地址不能为空！");
   $("#noticePush").attr("onclick","saveForm(this)");
   return false;
  }
  else if( emails==""||tel==""){
  alert("邮箱号或电话号码不为空");
   $("#noticePush").attr("onclick","saveForm(this)");
   return false;
  }
  else{
  document.getElementById("staForm").submit();  
  }
  }
</script>
</body>
</html>